package com.qdlc.p2p.dal.dto;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.qdlc.p2p.common.constant.Global;


/**
 * 加息券发放规
 *
 * @author liya
 * @version 1.1.0.0
 */
@Table
@Entity(name = Global.DB_PREFIX + "additional_rate_rule")
public class RateRule {

    public RateRule() {
    }

    public RateRule(long id) {
        this.id = id;
    }

    /** 主键 */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    /** 规则名 */
    private String ruleName;

    /** 是否启用:1-启用，2不启用 */
    private int isUse;

    /** 发放方式:1-按固定值,2-按投资额度获取不同的幅度加息券，3-随机额度 */
    private int payWay;

    /** 加息幅度:固定额度发放时，设置加息幅度 */
    private double upApr;

    /** 标识id */
    private String nid;

    /** 随机最小值:随机加息券时，最小额度 */
    private double minRandApr;

    /** 随机最大值 */
    private double maxRandApr;

    /** 有效期:按天计算 */
    private int valitTime;

    /** 预计发放总数 */
    private int payTotal;

    /** 实际发放数量 */
    private int realPayTotal;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getRuleName() {
        return ruleName;
    }

    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }

    public int getIsUse() {
        return isUse;
    }

    public void setIsUse(int isUse) {
        this.isUse = isUse;
    }


    public int getValitTime() {
        return valitTime;
    }

    public void setValitTime(int valitTime) {
        this.valitTime = valitTime;
    }

    public int getPayWay() {
        return payWay;
    }

    public void setPayWay(int payWay) {
        this.payWay = payWay;
    }

    public double getUpApr() {
        return upApr;
    }

    public void setUpApr(double upApr) {
        this.upApr = upApr;
    }

    public String getNid() {
        return nid;
    }

    public void setNid(String nid) {
        this.nid = nid;
    }

    public double getMinRandApr() {
        return minRandApr;
    }

    public void setMinRandApr(double minRandApr) {
        this.minRandApr = minRandApr;
    }

    public double getMaxRandApr() {
        return maxRandApr;
    }

    public void setMaxRandApr(double maxRandApr) {
        this.maxRandApr = maxRandApr;
    }


    public int getPayTotal() {
        return payTotal;
    }

    public void setPayTotal(int payTotal) {
        this.payTotal = payTotal;
    }

    public int getRealPayTotal() {
        return realPayTotal;
    }

    public void setRealPayTotal(int realPayTotal) {
        this.realPayTotal = realPayTotal;
    }
}
